import { createApp } from "vue";
import App from './App.vue'
import BookList from './components/BookList.vue'
import BookInfo from './components/BookInfo.vue'
import SelectBook from './components/SelectBook.vue'
import Cart from './components/Cart.vue'
import store from "./store";
import { createWebHashHistory,createRouter } from "vue-router";
const router = createRouter({
    history:createWebHashHistory(),
    routes:[
        {path:"/",redirect:"/books"},
        {path:"/books",component:BookList,name:"books"},
        {path:"/book/:id",component:BookInfo,name:"book",props:true},
        {path:"/select/:title",component:SelectBook,name:"select",props:true},
        {path:"/cart",component:Cart,name:"cart"}
    ]
})
const app = createApp(App)
app.use(store)
app.use(router)
app.mount("#app")
